﻿/*=================================================================================================
// <copyright company="AltaModa Technologies, LLC">
//	Copyright (c) AltaModa Technologies, LLC. All rights reserved.
//	http://www.AltaModaTech.com/
// </copyright>
// 
//	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
//	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 
//	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
//	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
//	CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
//	SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
//	THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
//	OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
//	POSSIBILITY OF SUCH DAMAGE.
//===============================================================================================*/

using System;
using System.Web.Profile;

namespace AMT.Web.Profile.Debug
{
	/// <summary>
	/// Provides unrestricted access to ProfileProvider interfaces, but doesn't store data or actually do anything.  This class is for development 
	/// and debug purposes; DO NOT USE IN PRODUCTION!
	/// </summary>
	public class PermitAllProfileProvider : System.Web.Profile.ProfileProvider
	{
		#region Provider name and description
		public override string Name
		{
			get
			{
				return "AMT.Web.Security.Debug.PermitAllProfileProvider - DO NOT use in production systems";
			}
		}


		public override string Description
		{
			get
			{
				return "AMT.Web.Security.Debug.PermitAllProfileProvider - DO NOT use in production systems";
			}
		}
		#endregion

		public override int DeleteInactiveProfiles(ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate)
		{
			return 0;
		}

		public override int DeleteProfiles(string[] usernames)
		{
			return 0;
		}

		public override int DeleteProfiles(ProfileInfoCollection profiles)
		{
			return 0;
		}

		public override ProfileInfoCollection FindInactiveProfilesByUserName(ProfileAuthenticationOption authenticationOption, string usernameToMatch, DateTime userInactiveSinceDate, int pageIndex, int pageSize, out int totalRecords)
		{
			totalRecords = 0;
			return null;
		}

		public override ProfileInfoCollection FindProfilesByUserName(ProfileAuthenticationOption authenticationOption, string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
		{
			totalRecords = 0;
			return null;
		}

		public override ProfileInfoCollection GetAllInactiveProfiles(ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate, int pageIndex, int pageSize, out int totalRecords)
		{
			totalRecords = 0;
			return null;
		}

		public override ProfileInfoCollection GetAllProfiles(ProfileAuthenticationOption authenticationOption, int pageIndex, int pageSize, out int totalRecords)
		{
			totalRecords = 0;
			return null;
		}

		public override int GetNumberOfInactiveProfiles(ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate)
		{
			return 0;
		}

		/// <summary>
		/// Retains any string set as the application name
		/// </summary>
		public override string ApplicationName { get; set; }

		public override System.Configuration.SettingsPropertyValueCollection GetPropertyValues(System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyCollection collection)
		{
			return null;
		}

		public override void SetPropertyValues(System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyValueCollection collection)
		{
			return;
		}

		// Ensure this class is not used for production purposes
#if DEBUG
#else
#error This class is not secure and should only be used for development and debugging purposes!
#endif
	}
}
